/*
 * Copyright 2011 Carnegie Mellon University
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *  
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, 
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package edu.cmu.lti.ritesdk.sample;

import edu.cmu.lti.ritesdk.WeightedMultiEngineFramework;

/**
 * Very simple toy implementation of the composite RITE system for BC subtask.
 * 
 * If you want to develop a system based on this, replace each random system 
 * with real implementation, and assign weights learned in your favorite algorithm. 
 * 
 * @author Hideki Shima
 *
 */
public class RandomMultiEngineSystem extends WeightedMultiEngineFramework {

  public RandomMultiEngineSystem() {
    // Using same random recognizers just for a sample purpose
    WeightedMultiEngineFramework composite1 = new WeightedMultiEngineFramework();
    composite1.add( new RandomBCSystem(), 0.1 );
    composite1.add( new RandomBCSystem(), 0.6 );
    WeightedMultiEngineFramework composite2 = new WeightedMultiEngineFramework();
    composite2.add( new RandomBCSystem(), 0.1 );
    composite2.add( new RandomBCSystem(), 0.2 );
    composite2.add( new RandomBCSystem(), 0.5 );
    composite2.add( new RandomBCSystem(), 0.9 );
    
    // There are three top-level components, combining 2 composites and 1 atomic system.
    this.add(composite1, 0.2);
    this.add(composite2, 0.4);
    this.add(new RandomBCSystem(), 1.0);
  }
  
}
